package com.jing.yao.component.constants;


import java.text.SimpleDateFormat;

/**
 * 公共变量
 * @author lirui
 * @since 2020-03-23
 */
public final class BmsConstants {

    /**
     * 降序
     */
    public static final String DESC = "DESC";

    /**
     * 升序
     */
    public static final String ASC = "ASC";

    /**
     * 编码
     */
    public static final String UTF_8 = "UTF-8";

    public static String SYSTEM_TIME_ZONE = "GMT+8";

    /**
     * 流水号默认长度
     */
    public static final Integer DEFAULT_SERIAL_NUM_LENGTH = 6;

    /**
     * 正常
     */
    public static final Byte ENABLE = 1;

    /**
     * 已删除
     */
    public static final Byte DELETED = 0;
    
    /**
     * 进口
     */
    public static final Byte TYPE_IMPORT = (byte)1;

    /**
     * 出口
     */
    public static final Byte TYPE_EXPORT = (byte)2;
    
    public static final String VALUE_Y = "Y";
    
    public static final String VALUE_N = "N";

    public static final SimpleDateFormat SDF = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    /**
     * 邮箱正则表达式
     */
    public static final String EMAIL_PATTERN = "^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$";

    /**
     * 整数
     */
    public static final String INTEGER_PATTERN = "^[0-9]*$";
    
    /**
     * 带2位小数的正则
     */
    public static final String DECIMAL_PATTERN_LENGTH_2 = "^([0-9]*)+(.[0-9]{1,2})?$";
    
    /**
     * 带3位小数的正则
     */
    public static final String DECIMAL_PATTERN_LENGTH_3 = "^([0-9]*)+(.[0-9]{1,3})?$";
    
    /**
     * 0.5的整数倍
     */
    public static final String MULTIMLE_PATTERN = "^\\d+(\\.[05])?$";
}
